<template>
	<view class="choose-time">
		<view class="month">
			<view class="top">
				<!-- <image @click="switchType" v-show="isMonth" class="img" src="http://herui-files.test.upcdn.net/bussiness/yx/X_AssetsManage/yue_1.png"></image> -->
				<view class='btn' @click="switchType" v-show="isMonth">按月选择</view>
				<!-- <image class="img" v-show="!isMonth" @click="switchType" src="http://herui-files.test.upcdn.net/bussiness/yx/X_AssetsManage/ri_1.png"></image> -->
				<view class='btn' v-show="!isMonth" @click="switchType">按日选择</view>
				<text class="text" @click="leave">完成</text>
			</view>
			<view class="content" :class="{ animation: isMonth }" v-show="isMonth">
				<view class="input">
					{{ dateValue }}
				</view>
				<view style="width: 100%;text-align: right;margin-top: 20rpx;" @click="del">
					<i-icon icon='iconlajitong' color='rgb(210,210,210)'></i-icon>
				</view>
				<view class="picker">
					<picker-view class="picker-content" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
						<picker-view-column>
								<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
						</picker-view-column>
						<picker-view-column>
								<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
						</picker-view-column>
					</picker-view>
				</view>
			</view>
			<view class="content" :class="{ animation: !isMonth }" v-show="!isMonth">
				<view class="input days" v-if="!isMonth">
					<view class="input-item" :class="{ active: curr === 0 }" @click="choose(0)">{{ value1 }}</view>
					<view class="text">至</view>
					<view class="input-item" :class="{ active: curr === 1 }" @click="choose(1)">{{ value2 }}</view>
				</view>
				<view class="picker">
					<picker-view class="picker-content" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
						<picker-view-column>
								<view class="item" v-for="(item,index) in years" :key="index">{{item}}年</view>
						</picker-view-column>
						<picker-view-column>
								<view class="item" v-for="(item,index) in months" :key="index">{{item}}月</view>
						</picker-view-column>
						<picker-view-column >
								<view class="item" v-for="(item,index) in days" :key="index">{{item}}日</view>
						</picker-view-column>
					</picker-view>
				</view>
			</view>
		</view>
	</view>
</template>
<script src="./chooseTime.js"></script>
<style lang="scss">
	@import './chooseTime.scss'
</style>
